package org.osgifx.ui;

import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.image.ImageView;
import javafx.scene.image.Image;

/**
 * @author johan
 */

public class BundleUI extends CustomNode {

  public-init var name;
  public-init var status;

  var title: Text = Text {
      font : Font {
        size: 14
      }
      x: 5, y: 5
      content: "{name}"
  }

  var icon: ImageView = ImageView {
	image: Image {
		url: "{__DIR__}bundle_installed.png"
	}
}

  var statusText: Text =  Text {
    font : Font {
      size: 14
    }
    x: 350, y: 5
    content: "status: {status}"
  }

  override function create () : Node {
    Group {
      content: [icon, title, statusText]
    }
  }

}
